home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / AppsToGo / •AppsToGo Reference / •AppsToGo Reference.rsrc / WFMT_219_a139 < prev    next >
Unknown  |  1994-09-22  |  5.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert TTComp Archive (archive/ttcomp) fallback Supported
100% file TTComp archive data, binary, 2K dictionary default (weak)
99% file data default
66% TrID TTComp archive compressed (bin-2K) default (weak)
33% TrID Adobe PhotoShop Brush default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 05 00 01 00 00 00 1a | 00 00 00 00 00 00 00 1a |........|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 05 00 05 00 00 |........|........|
|00000030| 00 1f 00 00 00 00 00 00 | 00 1f 61 31 33 39 00 00 |........|..a139..|
|00000040| 4e 16 00 00 20 19 00 00 | 00 00 00 00 00 00 00 00 |N... ...|........|
|00000050| 00 00 05 43 4c 4e 65 77 | 00 00 06 00 00 00 00 01 |...CLNew|........|
|00000060| 02 00 00 00 00 00 00 01 | 02 00 00 00 14 03 c1 00 |........|........|
|00000070| 28 05 7e 00 ff 00 00 00 | 00 00 00 0f a8 00 00 00 |(.~.....|........|
|00000080| 00 4e 1c 00 00 00 09 00 | 00 00 04 00 04 ff fc ff |.N......|........|
|00000090| fa 00 04 00 04 ff fc ff | fc 00 00 00 00 00 00 00 |........|........|
|000000a0| 00 83 00 0b 40 10 6b 53 | 63 72 65 65 6e 41 50 49 |....@.kS|creenAPI|
|000000b0| 2f 31 39 39 39 36 00 06 | 47 65 6e 65 76 61 00 00 |/19996..|Geneva..|
|000000c0| a8 4c 69 73 74 48 61 6e | 64 6c 65 20 43 4c 4e 65 |.ListHan|dle CLNe|
|000000d0| 77 28 73 68 6f 72 74 20 | 76 69 65 77 49 44 2c 20 |w(short |viewID, |
|000000e0| 42 6f 6f 6c 65 61 6e 20 | 76 69 73 2c 20 52 65 63 |Boolean |vis, Rec|
|000000f0| 74 20 2a 76 52 65 63 74 | 2c 20 73 68 6f 72 74 20 |t *vRect|, short |
|00000100| 6e 75 6d 52 6f 77 73 2c | 20 73 68 6f 72 74 20 6e |numRows,| short n|
|00000110| 75 6d 43 6f 6c 73 2c 20 | 73 68 6f 72 74 20 63 65 |umCols, |short ce|
|00000120| 6c 6c 48 65 69 67 68 74 | 2c 20 73 68 6f 72 74 20 |llHeight|, short |
|00000130| 63 65 6c 6c 57 69 64 74 | 68 2c 20 73 68 6f 72 74 |cellWidt|h, short|
|00000140| 20 74 68 65 4c 50 72 6f | 63 2c 20 57 69 6e 64 6f | theLPro|c, Windo|
|00000150| 77 50 74 72 20 77 69 6e | 64 6f 77 2c 20 73 68 6f |wPtr win|dow, sho|
|00000160| 72 74 20 6d 6f 64 65 29 | 3b 00 00 00 06 00 00 00 |rt mode)|;.......|
|00000170| 00 00 83 00 00 00 00 00 | 00 00 83 00 00 00 00 03 |........|........|
|00000180| c1 00 14 05 7e 00 ff 00 | 00 00 00 00 00 0f a8 00 |....~...|........|
|00000190| 00 00 00 4e 1d 00 00 00 | 09 00 00 00 04 00 04 ff |...N....|........|
|000001a0| fc ff fa 00 04 00 04 ff | fc ff fc 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 83 00 0b 40 14 | 6b 53 63 72 65 65 6e 4f |......@.|kScreenO|
|000001c0| 6e 65 4c 69 6e 65 2f 31 | 39 39 39 37 00 06 47 65 |neLine/1|9997..Ge|
|000001d0| 6e 65 76 61 00 00 25 43 | 72 65 61 74 65 20 61 20 |neva..%C|reate a |
|000001e0| 4c 69 73 74 20 63 6f 6e | 74 72 6f 6c 20 66 6f 72 |List con|trol for|
|000001f0| 20 74 68 65 20 77 69 6e | 64 6f 77 2e 00 00 00 06 | the win|dow.....|
|00000200| 00 00 00 00 00 44 00 00 | 00 00 00 00 00 44 00 00 |.....D..|.....D..|
|00000210| 00 00 02 6b 04 40 02 6c | 01 00 00 00 00 00 00 01 |...k.@.l|........|
|00000220| 0f f1 00 00 00 00 00 00 | 00 00 00 0c 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 06 00 00 00 00 | 00 a7 00 00 00 00 00 00 |........|........|
|00000260| 00 a7 00 00 00 00 02 6b | 02 28 03 c1 00 ff 00 00 |.......k|.(......|
|00000270| 00 00 00 00 0f a8 00 00 | 00 00 4e 16 00 00 00 09 |........|..N.....|
|00000280| 00 00 00 04 00 04 ff fc | ff fa 00 04 00 04 ff fc |........|........|
|00000290| ff fc 00 00 00 00 00 00 | 00 00 83 00 0b 40 0b 6c |........|.....@.l|
|000002a0| 69 6e 6b 73 2f 31 39 39 | 39 30 00 06 4d 6f 6e 61 |inks/199|90..Mona|
|000002b0| 63 6f 00 00 3c 61 31 33 | 30 2c 43 4c 45 76 65 6e |co..<a13|0,CLEven|
|000002c0| 74 0d 61 31 33 39 2c 43 | 4c 4e 65 77 0d 61 31 34 |t.a139,C|LNew.a14|
|000002d0| 43 2c 43 4c 56 69 65 77 | 46 72 6f 6d 4c 69 73 74 |C,CLView|FromList|
|000002e0| 0d 61 32 35 42 2c 49 73 | 43 74 6c 45 76 65 6e 74 |.a25B,Is|CtlEvent|
|000002f0| 0d 00 16 00 01 00 00 00 | 00 00 10 00 0c 00 01 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 06 00 00 00 00 14 |........|........|
|00000310| 22 00 00 00 00 00 00 14 | 22 00 00 00 00 00 00 75 |".......|"......u|
|00000320| 30 02 6b 01 ff 00 00 00 | 00 00 00 0f a8 00 00 00 |0.k.....|........|
|00000330| 00 4e 1f 00 00 00 09 00 | 00 00 04 00 04 ff fc ff |.N......|........|
|00000340| fa 00 04 00 04 ff fc ff | fc 00 00 00 00 00 00 00 |........|........|
|00000350| 00 83 00 0b 40 0a 62 6f | 64 79 2f 31 39 39 39 39 |....@.bo|dy/19999|
|00000360| 00 06 4d 6f 6e 61 63 6f | 00 13 18 4c 69 73 74 48 |..Monaco|...ListH|
|00000370| 61 6e 64 6c 65 20 43 4c | 4e 65 77 28 73 68 6f 72 |andle CL|New(shor|
|00000380| 74 20 76 69 65 77 49 44 | 2c 20 42 6f 6f 6c 65 61 |t viewID|, Boolea|
|00000390| 6e 20 76 69 73 2c 20 52 | 65 63 74 20 2a 76 52 65 |n vis, R|ect *vRe|
|000003a0| 63 74 2c 20 73 68 6f 72 | 74 20 6e 75 6d 52 6f 77 |ct, shor|t numRow|
|000003b0| 73 2c 20 73 68 6f 72 74 | 20 6e 75 6d 43 6f 6c 73 |s, short| numCols|
|000003c0| 2c 20 73 68 6f 72 74 20 | 63 65 6c 6c 48 65 69 67 |, short |cellHeig|
|000003d0| 68 74 2c 20 73 68 6f 72 | 74 20 63 65 6c 6c 57 69 |ht, shor|t cellWi|
|000003e0| 64 74 68 2c 20 73 68 6f | 72 74 20 74 68 65 4c 50 |dth, sho|rt theLP|
|000003f0| 72 6f 63 2c 20 57 69 6e | 64 6f 77 50 74 72 20 77 |roc, Win|dowPtr w|
|00000400| 69 6e 64 6f 77 2c 20 73 | 68 6f 72 74 20 6d 6f 64 |indow, s|hort mod|
|00000410| 65 29 3b 0d 0d 20 20 20 | 20 46 69 6c 65 3a 20 4c |e);.. | File: L|
|00000420| 69 73 74 43 6f 6e 74 72 | 6f 6c 2e 68 0d 0d 54 68 |istContr|ol.h..Th|
|00000430| 69 73 20 4c 69 73 74 20 | 63 6f 6e 74 72 6f 6c 20 |is List |control |
|00000440| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 64 |implemen|tation d|
|00000450| 6f 65 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |oes the |followin|
|00000460| 67 3a 0d 0d 31 29 20 20 | 4d 61 6b 65 73 20 75 73 |g:..1) |Makes us|
|00000470| 69 6e 67 20 6c 69 73 74 | 73 20 69 6e 20 61 20 6e |ing list|s in a n|
|00000480| 6f 6e 2d 64 69 61 6c 6f | 67 20 77 69 6e 64 6f 77 |on-dialo|g window|
|00000490| 20 65 61 73 69 65 72 2e | 0d 32 29 20 20 54 68 65 | easier.|.2) The|
|000004a0| 20 4c 69 73 74 20 69 73 | 20 61 75 74 6f 6d 61 74 | List is| automat|
|000004b0| 69 63 61 6c 6c 79 20 61 | 73 73 6f 63 69 61 74 65 |ically a|ssociate|
|000004c0| 64 20 77 69 74 68 20 74 | 68 65 20 77 69 6e 64 6f |d with t|he windo|
|000004d0| 77 2c 20 73 69 6e 63 65 | 0d 20 20 20 20 69 74 20 |w, since|. it |
|000004e0| 69 73 20 69 6e 20 74 68 | 65 20 77 69 6e 64 6f 77 |is in th|e window|
|000004f0| 27 73 20 63 6f 6e 74 72 | 6f 6c 20 6c 69 73 74 2e |'s contr|ol list.|
|00000500| 0d 34 29 20 20 55 70 64 | 61 74 69 6e 67 20 6f 66 |.4) Upd|ating of|
|00000510| 20 74 68 65 20 4c 69 73 | 74 20 69 73 20 6d 75 63 | the Lis|t is muc|
|00000520| 68 20 73 69 6d 70 6c 65 | 72 2c 20 73 69 6e 63 65 |h simple|r, since|
|00000530| 20 61 6c 6c 20 74 68 61 | 74 20 69 73 0d 20 20 20 | all tha|t is. |
|00000540| 20 6e 65 63 65 73 73 61 | 72 79 20 69 73 20 74 6f | necessa|ry is to|
|00000550| 20 64 72 61 77 20 74 68 | 65 20 63 6f 6e 74 72 6f | draw th|e contro|
|00000560| 6c 20 28 6f 72 20 61 6c | 6c 20 74 68 65 20 77 69 |l (or al|l the wi|
|00000570| 6e 64 6f 77 27 73 20 63 | 6f 6e 74 72 6f 6c 73 20 |ndow's c|ontrols |
|00000580| 77 69 74 68 0d 20 20 20 | 20 61 20 44 72 61 77 43 |with. | a DrawC|
|00000590| 6f 6e 74 72 6f 6c 73 20 | 63 61 6c 6c 29 2e 0d 35 |ontrols |call)..5|
|000005a0| 29 20 20 57 68 61 74 20 | 69 73 6e 27 74 20 68 61 |) What |isn't ha|
|000005b0| 6e 64 6c 65 64 20 61 75 | 74 6f 6d 61 74 69 63 61 |ndled au|tomatica|
|000005c0| 6c 6c 79 20 62 79 20 74 | 72 61 63 6b 69 6e 67 20 |lly by t|racking |
|000005d0| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 20 63 61 6e 20 |the cont|rol can |
|000005e0| 62 65 20 68 61 6e 64 6c | 65 64 0d 20 20 20 20 77 |be handl|ed. w|
|000005f0| 69 74 68 20 61 20 64 69 | 72 65 63 74 20 63 61 6c |ith a di|rect cal|
|00000600| 6c 2e 20 20 54 68 65 72 | 65 20 61 72 65 20 73 69 |l. Ther|e are si|
|00000610| 6d 70 6c 65 20 63 61 6c | 6c 73 20 74 6f 20 68 61 |mple cal|ls to ha|
|00000620| 6e 64 6c 65 20 4c 69 73 | 74 20 65 76 65 6e 74 73 |ndle Lis|t events|
|00000630| 2e 0d 36 29 20 20 57 68 | 65 6e 20 79 6f 75 20 63 |..6) Wh|en you c|
|00000640| 6c 6f 73 65 20 74 68 65 | 20 77 69 6e 64 6f 77 2c |lose the| window,|
|00000650| 20 74 68 65 20 4c 69 73 | 74 52 65 63 6f 72 64 20 | the Lis|tRecord |
|00000660| 69 73 20 64 69 73 70 6f | 73 65 64 20 6f 66 2e 0d |is dispo|sed of..|
|00000670| 20 20 20 20 28 54 68 69 | 73 20 61 75 74 6f 6d 61 | (Thi|s automa|
|00000680| 74 69 63 20 64 69 73 70 | 6f 73 61 6c 20 63 61 6e |tic disp|osal can|
|00000690| 20 65 61 73 69 6c 79 20 | 62 65 20 64 65 66 65 61 | easily |be defea|
|000006a0| 74 65 64 2e 29 0d 0d 54 | 6f 20 63 72 65 61 74 65 |ted.)..T|o create|
|000006b0| 20 61 20 4c 69 73 74 20 | 63 6f 6e 74 72 6f 6c 2c | a List |control,|
|000006c0| 20 79 6f 75 20 6f 6e 6c | 79 20 6e 65 65 64 20 61 | you onl|y need a|
|000006d0| 20 73 69 6e 67 6c 65 20 | 63 61 6c 6c 2e 20 20 46 | single |call. F|
|000006e0| 6f 72 20 65 78 61 6d 70 | 6c 65 3a 0d 0d 20 20 20 |or examp|le:.. |
|000006f0| 20 6c 69 73 74 20 3d 20 | 43 4c 4e 65 77 28 72 56 | list = |CLNew(rV|
|00000700| 69 65 77 43 74 6c 2c 20 | 20 20 20 20 20 20 20 20 |iewCtl, | |
|00000710| 20 52 65 73 6f 75 72 63 | 65 20 49 44 20 6f 66 20 | Resourc|e ID of |
|00000720| 76 69 65 77 20 63 6f 6e | 74 72 6f 6c 20 66 6f 72 |view con|trol for|
|00000730| 20 4c 69 73 74 20 63 6f | 6e 74 72 6f 6c 2e 0d 20 | List co|ntrol.. |
|00000740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000750| 74 72 75 65 2c 20 20 20 | 20 20 20 20 20 20 20 20 |true, | |
|00000760| 20 20 20 49 6e 69 74 69 | 61 6c 6c 79 20 76 69 73 | Initi|ally vis|
|00000770| 69 62 6c 65 2e 0d 20 20 | 20 20 20 20 20 20 20 20 |ible.. | |
|00000780| 20 20 20 20 20 20 20 26 | 76 69 65 77 52 65 63 74 | &|viewRect|
|00000790| 2c 20 20 20 20 20 20 20 | 20 20 56 69 65 77 20 72 |, | View r|
|000007a0| 65 63 74 20 6f 66 20 6c | 69 73 74 2e 0d 20 20 20 |ect of l|ist.. |
|000007b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6e 75 | | nu|
|000007c0| 6d 52 6f 77 73 2c 20 20 | 20 20 20 20 20 20 20 20 |mRows, | |
|000007d0| 20 4e 75 6d 62 65 72 20 | 6f 66 20 72 6f 77 73 20 | Number |of rows |
|000007e0| 74 6f 20 63 72 65 61 74 | 65 20 4c 69 73 74 20 77 |to creat|e List w|
|000007f0| 69 74 68 2e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ith.. | |
|00000800| 20 20 20 20 20 20 6e 75 | 6d 43 6f 6c 73 2c 20 20 | nu|mCols, |
|00000810| 20 20 20 20 20 20 20 20 | 20 4e 75 6d 62 65 72 20 | | Number |
|00000820| 6f 66 20 63 6f 6c 75 6d | 6e 73 20 74 6f 20 63 72 |of colum|ns to cr|
|00000830| 65 61 74 65 20 4c 69 73 | 74 20 77 69 74 68 2e 0d |eate Lis|t with..|
|00000840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000850| 20 63 65 6c 6c 48 65 69 | 67 68 74 2c 0d 20 20 20 | cellHei|ght,. |
|00000860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 65 | | ce|
|00000870| 6c 6c 57 69 64 74 68 2c | 0d 20 20 20 20 20 20 20 |llWidth,|. |
|00000880| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 4c 50 72 | | theLPr|
|00000890| 6f 63 2c 20 20 20 20 20 | 20 20 20 20 20 43 75 73 |oc, | Cus|
|000008a0| 74 6f 6d 20 4c 69 73 74 | 20 70 72 6f 63 65 64 75 |tom List| procedu|
|000008b0| 72 65 20 72 65 73 6f 75 | 72 63 65 20 49 44 2e 0d |re resou|rce ID..|
|000008c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008d0| 20 77 69 6e 64 6f 77 2c | 20 20 20 20 20 20 20 20 | window,| |
|000008e0| 20 20 20 20 57 69 6e 64 | 6f 77 20 74 6f 20 68 6f | Wind|ow to ho|
|000008f0| 6c 64 20 4c 69 73 74 20 | 63 6f 6e 74 72 6f 6c 2e |ld List |control.|
|00000900| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000910| 20 20 63 6c 48 53 63 72 | 6f 6c 6c 20 7c 20 62 6c | clHScr|oll | bl|
|00000920| 42 72 64 72 20 7c 20 63 | 6c 41 63 74 69 76 65 29 |Brdr | c|lActive)|
|00000930| 3b 20 20 20 20 48 6f 72 | 69 7a 6f 6e 74 61 6c 20 |; Hor|izontal |
|00000940| 73 63 72 6f 6c 6c 62 61 | 72 2c 20 61 63 74 69 76 |scrollba|r, activ|
|00000950| 65 20 4c 69 73 74 2e 0d | 0d 54 68 65 20 76 61 72 |e List..|.The var|
|00000960| 69 6f 75 73 20 63 68 6f | 69 63 65 73 20 66 6f 72 |ious cho|ices for|
|00000970| 20 74 68 65 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f | the Lis|t contro|
|00000980| 6c 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 61 73 |l are de|fined as|
|00000990| 20 66 6f 6c 6c 6f 77 73 | 3a 0d 0d 23 64 65 66 69 | follows|:..#defi|
|000009a0| 6e 65 20 63 6c 48 53 63 | 72 6f 6c 6c 20 20 20 20 |ne clHSc|roll |
|000009b0| 20 20 20 30 78 30 30 30 | 32 0d 23 64 65 66 69 6e | 0x000|2.#defin|
|000009c0| 65 20 63 6c 56 53 63 72 | 6f 6c 6c 20 20 20 20 20 |e clVScr|oll |
|000009d0| 20 20 30 78 30 30 30 38 | 0d 23 64 65 66 69 6e 65 | 0x0008|.#define|
|000009e0| 20 63 6c 41 63 74 69 76 | 65 20 20 20 20 20 20 20 | clActiv|e |
|000009f0| 20 30 78 30 30 32 30 0d | 23 64 65 66 69 6e 65 20 | 0x0020.|#define |
|00000a00| 63 6c 53 68 6f 77 41 63 | 74 69 76 65 20 20 20 20 |clShowAc|tive |
|00000a10| 30 78 30 30 34 30 0d 23 | 64 65 66 69 6e 65 20 63 |0x0040.#|define c|
|00000a20| 6c 4b 65 79 50 6f 73 20 | 20 20 20 20 20 20 20 30 |lKeyPos | 0|
|00000a30| 78 30 30 38 30 0d 23 64 | 65 66 69 6e 65 20 63 6c |x0080.#d|efine cl|
|00000a40| 54 77 6f 53 74 65 70 20 | 20 20 20 20 20 20 30 78 |TwoStep | 0x|
|00000a50| 30 31 30 30 0d 23 64 65 | 66 69 6e 65 20 63 6c 48 |0100.#de|fine clH|
|00000a60| 61 73 47 72 6f 77 20 20 | 20 20 20 20 20 30 78 30 |asGrow | 0x0|
|00000a70| 32 30 30 0d 23 64 65 66 | 69 6e 65 20 63 6c 44 72 |200.#def|ine clDr|
|00000a80| 61 77 49 74 20 20 20 20 | 20 20 20 20 30 78 38 30 |awIt | 0x80|
|00000a90| 30 30 0d 0d 63 6c 48 53 | 63 72 6f 6c 6c 3a 20 20 |00..clHS|croll: |
|00000aa0| 20 20 20 20 43 72 65 61 | 74 65 20 61 20 6c 69 73 | Crea|te a lis|
|00000ab0| 74 20 74 68 61 74 20 69 | 6e 63 6c 75 64 65 73 20 |t that i|ncludes |
|00000ac0| 61 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 73 63 72 |a horizo|ntal scr|
|00000ad0| 6f 6c 6c 62 61 72 2e 0d | 63 6c 56 53 63 72 6f 6c |ollbar..|clVScrol|
|00000ae0| 6c 3a 20 20 20 20 20 20 | 43 72 65 61 74 65 20 61 |l: |Create a|
|00000af0| 20 6c 69 73 74 20 74 68 | 61 74 20 69 6e 63 6c 75 | list th|at inclu|
|00000b00| 64 65 73 20 61 20 76 65 | 72 74 69 63 61 6c 20 73 |des a ve|rtical s|
|00000b10| 63 72 6f 6c 6c 62 61 72 | 2e 0d 63 6c 41 63 74 69 |crollbar|..clActi|
|00000b20| 76 65 3a 20 20 20 20 20 | 20 20 4d 61 6b 65 20 74 |ve: | Make t|
|00000b30| 68 69 73 20 74 68 65 20 | 69 6e 69 74 69 61 6c 6c |his the |initiall|
|00000b40| 79 20 61 63 74 69 76 65 | 20 63 6f 6e 74 72 6f 6c |y active| control|
|00000b50| 20 66 6f 72 20 74 68 65 | 20 77 69 6e 64 6f 77 2e | for the| window.|
|00000b60| 0d 63 6c 53 68 6f 77 41 | 63 74 69 76 65 3a 20 20 |.clShowA|ctive: |
|00000b70| 20 57 68 65 6e 20 74 68 | 65 20 63 6f 6e 74 72 6f | When th|e contro|
|00000b80| 6c 20 69 73 20 61 63 74 | 69 76 65 2c 20 73 68 6f |l is act|ive, sho|
|00000b90| 77 20 74 68 61 74 20 69 | 74 20 69 73 20 62 79 20 |w that i|t is by |
|00000ba0| 64 72 61 77 69 6e 67 20 | 61 20 73 65 6c 65 63 74 |drawing |a select|
|00000bb0| 69 6f 6e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ion. | |
|00000bc0| 20 20 20 20 62 6f 72 64 | 65 72 20 61 72 6f 75 6e | bord|er aroun|
|00000bd0| 64 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 2e 20 20 |d the co|ntrol. |
|00000be0| 54 68 69 73 20 69 73 20 | 74 68 65 20 6e 65 77 20 |This is |the new |
|00000bf0| 37 2e 30 20 68 75 6d 61 | 6e 2d 69 6e 74 65 72 66 |7.0 huma|n-interf|
|00000c00| 61 63 65 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ace. | |
|00000c10| 20 20 20 20 6d 65 74 68 | 6f 64 20 6f 66 20 73 68 | meth|od of sh|
|00000c20| 6f 77 69 6e 67 20 77 68 | 69 63 68 20 63 6f 6e 74 |owing wh|ich cont|
|00000c30| 72 6f 6c 20 69 73 20 61 | 63 74 69 76 65 2e 20 20 |rol is a|ctive. |
|00000c40| 28 49 74 20 61 6c 73 6f | 20 77 6f 72 6b 73 20 69 |(It also| works i|
|00000c50| 6e 20 73 79 73 74 65 6d | 20 36 2e 29 0d 63 6c 4b |n system| 6.).clK|
|00000c60| 65 79 50 6f 73 3a 20 20 | 20 20 20 20 20 41 6c 6c |eyPos: | All|
|00000c70| 6f 77 20 6c 69 73 74 20 | 70 6f 73 69 74 69 6f 6e |ow list |position|
|00000c80| 69 6e 67 2c 20 62 61 73 | 65 64 20 6f 6e 20 75 73 |ing, bas|ed on us|
|00000c90| 65 72 20 6b 65 79 70 72 | 65 73 73 65 73 2e 20 20 |er keypr|esses. |
|00000ca0| 54 68 69 73 20 61 73 73 | 75 6d 65 73 20 74 68 61 |This ass|umes tha|
|00000cb0| 74 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t. | |
|00000cc0| 20 20 74 68 65 20 6c 69 | 73 74 20 69 73 20 61 6c | the li|st is al|
|00000cd0| 70 68 61 62 65 74 69 7a | 65 64 20 73 6f 20 74 68 |phabetiz|ed so th|
|00000ce0| 61 74 20 6b 65 79 20 70 | 72 65 73 73 65 73 20 66 |at key p|resses f|
|00000cf0| 6f 72 20 6c 6f 63 61 74 | 69 6f 6e 20 6d 61 6b 65 |or locat|ion make|
|00000d00| 20 73 65 6e 73 65 2e 0d | 20 20 20 20 20 20 20 20 | sense..| |
|00000d10| 20 20 20 20 20 20 20 20 | 49 66 20 74 79 70 69 6e | |If typin|
|00000d20| 67 20 62 79 20 74 68 65 | 20 75 73 65 72 20 69 73 |g by the| user is|
|00000d30| 20 66 61 73 74 20 65 6e | 6f 75 67 68 2c 20 6d 75 | fast en|ough, mu|
|00000d40| 6c 74 69 70 6c 65 20 63 | 68 61 72 61 63 74 65 72 |ltiple c|haracter|
|00000d50| 73 20 77 69 6c 6c 20 62 | 65 0d 20 20 20 20 20 20 |s will b|e. |
|00000d60| 20 20 20 20 20 20 20 20 | 20 20 75 73 65 64 20 66 | | used f|
|00000d70| 6f 72 20 74 68 65 20 70 | 6f 73 69 74 69 6f 6e 69 |or the p|ositioni|
|00000d80| 6e 67 2e 0d 63 6c 54 77 | 6f 53 74 65 70 3a 20 20 |ng..clTw|oStep: |
|00000d90| 20 20 20 20 57 68 65 6e | 20 75 73 69 6e 67 20 49 | When| using I|
|00000da0| 73 43 74 6c 45 76 65 6e | 74 28 29 2c 20 79 6f 75 |sCtlEven|t(), you|
|00000db0| 20 6d 61 79 20 77 61 6e | 74 20 74 68 65 20 69 6e | may wan|t the in|
|00000dc0| 69 74 69 61 6c 20 63 6c | 69 63 6b 20 6f 6e 20 61 |itial cl|ick on a|
|00000dd0| 20 4c 69 73 74 0d 20 20 | 20 20 20 20 20 20 20 20 | List. | |
|00000de0| 20 20 20 20 20 20 63 6f | 6e 74 72 6f 6c 20 74 6f | co|ntrol to|
|00000df0| 20 6a 75 73 74 20 73 65 | 6c 65 63 74 20 74 68 65 | just se|lect the|
|00000e00| 20 63 6f 6e 74 72 6f 6c | 2c 20 6f 72 20 79 6f 75 | control|, or you|
|00000e10| 20 6d 61 79 20 77 69 73 | 68 20 74 68 65 20 63 6c | may wis|h the cl|
|00000e20| 69 63 6b 20 74 6f 20 73 | 74 61 72 74 0d 20 20 20 |ick to s|tart. |
|00000e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 74 72 61 | | tra|
|00000e40| 63 6b 69 6e 67 20 69 6e | 20 61 64 64 69 74 69 6f |cking in| additio|
|00000e50| 6e 20 74 6f 20 73 65 6c | 65 63 74 69 6e 67 20 74 |n to sel|ecting t|
|00000e60| 68 65 20 63 6f 6e 74 72 | 6f 6c 2e 20 20 54 68 65 |he contr|ol. The|
|00000e70| 20 74 72 61 63 6b 69 6e | 67 20 69 73 0d 20 20 20 | trackin|g is. |
|00000e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 6f 6e | | con|
|00000e90| 73 69 64 65 72 65 64 20 | 74 68 65 20 73 65 63 6f |sidered |the seco|
|00000ea0| 6e 64 20 73 74 65 70 2e | 20 20 42 79 20 73 65 74 |nd step.| By set|
|00000eb0| 74 69 6e 67 20 74 68 69 | 73 20 62 69 74 2c 20 79 |ting thi|s bit, y|
|00000ec0| 6f 75 20 69 6e 64 69 63 | 61 74 65 20 74 68 61 74 |ou indic|ate that|
|00000ed0| 20 79 6f 75 0d 20 20 20 | 20 20 20 20 20 20 20 20 | you. | |
|00000ee0| 20 20 20 20 20 77 61 6e | 74 20 63 6f 6e 74 72 6f | wan|t contro|
|00000ef0| 6c 20 73 65 6c 65 63 74 | 69 6f 6e 20 61 6e 64 20 |l select|ion and |
|00000f00| 69 74 65 6d 20 73 65 6c | 65 63 74 69 6f 6e 20 74 |item sel|ection t|
|00000f10| 6f 20 62 65 20 61 20 32 | 2d 73 74 65 70 20 70 72 |o be a 2|-step pr|
|00000f20| 6f 63 65 73 73 2e 0d 20 | 20 20 20 20 20 20 20 20 |ocess.. | |
|00000f30| 20 20 20 20 20 20 20 53 | 65 74 74 69 6e 67 20 74 | S|etting t|
|00000f40| 68 69 73 20 62 69 74 20 | 6d 65 61 6e 73 20 74 68 |his bit |means th|
|00000f50| 61 74 20 69 74 20 77 69 | 6c 6c 20 74 61 6b 65 20 |at it wi|ll take |
|00000f60| 32 20 73 65 70 61 72 61 | 74 65 20 63 6c 69 63 6b |2 separa|te click|
|00000f70| 73 20 62 79 20 74 68 65 | 0d 20 20 20 20 20 20 20 |s by the|. |
|00000f80| 20 20 20 20 20 20 20 20 | 20 75 73 65 72 20 74 6f | | user to|
|00000f90| 20 73 65 6c 65 63 74 20 | 61 6e 20 69 74 65 6d 20 | select |an item |
|00000fa0| 69 6e 20 74 68 65 20 6c | 69 73 74 20 69 66 20 74 |in the l|ist if t|
|00000fb0| 68 65 20 6c 69 73 74 20 | 69 73 20 69 6e 61 63 74 |he list |is inact|
|00000fc0| 69 76 65 2e 0d 63 6c 48 | 61 73 47 72 6f 77 3a 20 |ive..clH|asGrow: |
|00000fd0| 20 20 20 20 20 54 68 69 | 73 20 6d 61 6b 65 73 20 | Thi|s makes |
|00000fe0| 73 75 72 65 20 74 68 61 | 74 20 74 68 65 72 65 20 |sure tha|t there |
|00000ff0| 69 73 20 73 70 61 63 65 | 20 66 6f 72 20 74 68 65 |is space| for the|
|00001000| 20 67 72 6f 77 49 63 6f | 6e 20 69 66 20 74 68 65 | growIco|n if the|
|00001010| 20 6c 69 73 74 0d 20 20 | 20 20 20 20 20 20 20 20 | list. | |
|00001020| 20 20 20 20 20 20 68 61 | 73 20 61 20 73 63 72 6f | ha|s a scro|
|00001030| 6c 6c 62 61 72 2e 20 20 | 49 66 20 74 68 65 20 6c |llbar. |If the l|
|00001040| 69 73 74 20 6f 63 63 75 | 70 69 65 73 20 61 6e 20 |ist occu|pies an |
|00001050| 65 6e 74 69 72 65 20 77 | 69 6e 64 6f 77 2c 20 74 |entire w|indow, t|
|00001060| 68 65 6e 20 69 66 20 74 | 68 65 72 65 0d 20 20 20 |hen if t|here. |
|00001070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 73 20 | | is |
|00001080| 6f 6e 6c 79 20 6f 6e 65 | 20 73 63 72 6f 6c 6c 62 |only one| scrollb|
|00001090| 61 72 2c 20 74 68 65 20 | 73 63 72 6f 6c 6c 62 61 |ar, the |scrollba|
|000010a0| 72 20 68 61 73 20 74 6f | 20 62 65 20 73 68 72 75 |r has to| be shru|
|000010b0| 6e 6b 20 74 6f 20 6d 61 | 6b 65 20 72 6f 6f 6d 0d |nk to ma|ke room.|
|000010c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010d0| 66 6f 72 20 74 68 65 20 | 67 72 6f 77 49 63 6f 6e |for the |growIcon|
|000010e0| 2e 20 20 54 68 65 20 4c | 69 73 74 20 4d 61 6e 61 |. The L|ist Mana|
|000010f0| 67 65 72 20 73 75 70 70 | 6f 73 65 64 6c 79 20 68 |ger supp|osedly h|
|00001100| 61 73 20 74 68 69 73 20 | 61 62 69 6c 69 74 79 2c |as this |ability,|
|00001110| 20 62 75 74 0d 20 20 20 | 20 20 20 20 20 20 20 20 | but. | |
|00001120| 20 20 20 20 20 69 74 20 | 64 6f 65 73 6e 27 74 20 | it |doesn't |
|00001130| 77 6f 72 6b 2e 20 20 54 | 68 65 20 4c 69 73 74 20 |work. T|he List |
|00001140| 63 6f 6e 74 72 6f 6c 20 | 6d 61 6e 61 67 65 73 20 |control |manages |
|00001150| 69 74 20 63 6f 72 72 65 | 63 74 6c 79 2e 0d 63 6c |it corre|ctly..cl|
|00001160| 44 72 61 77 49 74 3a 20 | 20 20 20 20 20 20 54 68 |DrawIt: | Th|
|00001170| 69 73 20 69 73 20 61 20 | 4c 69 73 74 20 6d 61 6e |is is a |List man|
|00001180| 61 67 65 72 20 66 6c 61 | 67 20 74 68 61 74 20 69 |ager fla|g that i|
|00001190| 73 20 6e 65 65 64 65 64 | 20 66 6f 72 20 74 68 65 |s needed| for the|
|000011a0| 20 4c 4e 65 77 28 29 20 | 63 61 6c 6c 2e 0d 0d 0d | LNew() |call....|
|000011b0| 49 66 20 74 68 65 20 43 | 4c 4e 65 77 20 63 61 6c |If the C|LNew cal|
|000011c0| 6c 20 73 75 63 63 65 65 | 64 73 2c 20 79 6f 75 20 |l succee|ds, you |
|000011d0| 74 68 65 6e 20 68 61 76 | 65 20 61 20 4c 69 73 74 |then hav|e a List|
|000011e0| 20 63 6f 6e 74 72 6f 6c | 20 69 6e 20 79 6f 75 72 | control| in your|
|000011f0| 20 77 69 6e 64 6f 77 2e | 20 20 49 74 20 77 69 6c | window.| It wil|
|00001200| 6c 20 62 65 0d 61 75 74 | 6f 6d 61 74 69 63 61 6c |l be.aut|omatical|
|00001210| 6c 79 20 64 69 73 70 6f | 73 65 64 20 6f 66 20 77 |ly dispo|sed of w|
|00001220| 68 65 6e 20 79 6f 75 20 | 63 6c 6f 73 65 20 74 68 |hen you |close th|
|00001230| 65 20 77 69 6e 64 6f 77 | 2e 20 20 49 66 20 79 6f |e window|. If yo|
|00001240| 75 20 64 6f 6e 27 74 20 | 77 61 6e 74 20 74 68 69 |u don't |want thi|
|00001250| 73 20 74 6f 20 68 61 70 | 70 65 6e 2c 0d 74 68 65 |s to hap|pen,.the|
|00001260| 6e 20 79 6f 75 20 63 61 | 6e 20 64 65 74 61 63 68 |n you ca|n detach|
|00001270| 20 69 74 20 66 72 6f 6d | 20 74 68 65 20 76 69 65 | it from| the vie|
|00001280| 77 20 63 6f 6e 74 72 6f | 6c 20 77 68 69 63 68 20 |w contro|l which |
|00001290| 6f 77 6e 73 20 69 74 2e | 20 20 54 6f 20 64 6f 20 |owns it.| To do |
|000012a0| 74 68 69 73 2c 20 79 6f | 75 20 77 6f 75 6c 64 20 |this, yo|u would |
|000012b0| 74 6f 0d 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |to.the f|ollowing|
|000012c0| 3a 0d 0d 20 20 20 20 76 | 69 65 77 43 74 6c 20 3d |:.. v|iewCtl =|
|000012d0| 20 43 4c 56 69 65 77 46 | 72 6f 6d 4c 69 73 74 28 | CLViewF|romList(|
|000012e0| 74 68 65 4c 69 73 74 48 | 6e 64 6c 29 3b 0d 20 20 |theListH|ndl);. |
|000012f0| 20 20 69 66 20 28 76 69 | 65 77 43 74 6c 29 20 53 | if (vi|ewCtl) S|
|00001300| 65 74 43 52 65 66 43 6f | 6e 28 76 69 65 77 43 74 |etCRefCo|n(viewCt|
|00001310| 6c 2c 20 6e 69 6c 29 3b | 0d 0d 54 68 65 20 76 69 |l, nil);|..The vi|
|00001320| 65 77 20 63 6f 6e 74 72 | 6f 6c 20 6b 65 65 70 73 |ew contr|ol keeps|
|00001330| 20 61 20 72 65 66 65 72 | 65 6e 63 65 20 74 6f 20 | a refer|ence to |
|00001340| 74 68 65 20 4c 69 73 74 | 20 72 65 63 6f 72 64 20 |the List| record |
|00001350| 69 6e 20 74 68 65 20 72 | 65 66 43 6f 6e 2e 20 20 |in the r|efCon. |
|00001360| 49 66 20 74 68 65 20 72 | 65 66 43 6f 6e 20 69 73 |If the r|efCon is|
|00001370| 0d 63 6c 65 61 72 65 64 | 2c 20 74 68 65 6e 20 74 |.cleared|, then t|
|00001380| 68 65 20 76 69 65 77 20 | 63 6f 6e 74 72 6f 6c 20 |he view |control |
|00001390| 64 6f 65 73 20 6e 6f 74 | 68 69 6e 67 2e 20 20 53 |does not|hing. S|
|000013a0| 6f 2c 20 61 6c 6c 20 74 | 68 61 74 20 69 73 20 6e |o, all t|hat is n|
|000013b0| 65 65 64 65 64 20 74 6f | 20 64 65 74 61 63 68 20 |eeded to| detach |
|000013c0| 61 20 4c 69 73 74 0d 72 | 65 63 6f 72 64 20 66 72 |a List.r|ecord fr|
|000013d0| 6f 6d 20 61 20 76 69 65 | 77 20 63 6f 6e 74 72 6f |om a vie|w contro|
|000013e0| 6c 20 69 73 20 74 6f 20 | 73 65 74 20 74 68 65 20 |l is to |set the |
|000013f0| 76 69 65 77 20 63 6f 6e | 74 72 6f 6c 27 73 20 72 |view con|trol's r|
|00001400| 65 66 43 6f 6e 20 6e 69 | 6c 2e 20 20 4e 6f 77 20 |efCon ni|l. Now |
|00001410| 69 66 20 79 6f 75 20 63 | 6c 6f 73 65 20 74 68 65 |if you c|lose the|
|00001420| 0d 77 69 6e 64 6f 77 2c | 20 79 6f 75 20 77 69 6c |.window,| you wil|
|00001430| 6c 20 73 74 69 6c 6c 20 | 68 61 76 65 20 74 68 65 |l still |have the|
|00001440| 20 4c 69 73 74 20 72 65 | 63 6f 72 64 2e 0d 0d 0d | List re|cord....|
|00001450| 54 6f 20 72 65 6d 6f 76 | 65 20 61 20 4c 69 73 74 |To remov|e a List|
|00001460| 20 63 6f 6e 74 72 6f 6c | 20 63 6f 6d 70 6c 65 74 | control| complet|
|00001470| 65 6c 79 20 66 72 6f 6d | 20 61 20 77 69 6e 64 6f |ely from| a windo|
|00001480| 77 2c 20 6a 75 73 74 20 | 64 69 73 70 6f 73 65 20 |w, just |dispose |
|00001490| 6f 66 20 74 68 65 20 76 | 69 65 77 0d 63 6f 6e 74 |of the v|iew.cont|
|000014a0| 72 6f 6c 20 74 68 61 74 | 20 68 6f 6c 64 73 20 74 |rol that| holds t|
|000014b0| 68 65 20 4c 69 73 74 20 | 72 65 63 6f 72 64 2e 20 |he List |record. |
|000014c0| 20 54 6f 20 64 6f 20 74 | 68 69 73 2c 20 6a 75 73 | To do t|his, jus|
|000014d0| 74 20 64 6f 20 73 6f 6d | 65 74 68 69 6e 67 20 6c |t do som|ething l|
|000014e0| 69 6b 65 20 74 68 65 20 | 62 65 6c 6f 77 3a 0d 0d |ike the |below:..|
|000014f0| 20 20 20 20 44 69 73 70 | 6f 73 65 43 6f 6e 74 72 | Disp|oseContr|
|00001500| 6f 6c 28 43 4c 56 69 65 | 77 46 72 6f 6d 4c 69 73 |ol(CLVie|wFromLis|
|00001510| 74 28 74 68 65 4c 69 73 | 74 48 6e 64 6c 29 29 3b |t(theLis|tHndl));|
|00001520| 0d 0d 54 68 69 73 20 63 | 6f 6d 70 6c 65 74 65 6c |..This c|ompletel|
|00001530| 79 20 64 69 73 70 6f 73 | 65 73 20 6f 66 20 74 68 |y dispos|es of th|
|00001540| 65 20 4c 69 73 74 20 63 | 6f 6e 74 72 6f 6c 2e 0d |e List c|ontrol..|
|00001550| 0d 0d 45 76 65 6e 74 73 | 20 66 6f 72 20 74 68 65 |..Events| for the|
|00001560| 20 4c 69 73 74 20 72 65 | 63 6f 72 64 20 61 72 65 | List re|cord are|
|00001570| 20 68 61 6e 64 6c 65 64 | 20 6e 65 61 72 6c 79 20 | handled| nearly |
|00001580| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 2e 20 20 |automati|cally. |
|00001590| 4a 75 73 74 20 6d 61 6b | 65 20 74 68 65 20 66 6f |Just mak|e the fo|
|000015a0| 6c 6c 6f 77 69 6e 67 20 | 63 61 6c 6c 3a 0d 0d 20 |llowing |call:.. |
|000015b0| 20 20 20 43 4c 45 76 65 | 6e 74 28 77 69 6e 64 6f | CLEve|nt(windo|
|000015c0| 77 2c 20 65 76 65 6e 74 | 50 74 72 2c 20 26 61 63 |w, event|Ptr, &ac|
|000015d0| 74 69 6f 6e 29 3b 0d 0d | 49 66 20 74 68 65 20 65 |tion);..|If the e|
|000015e0| 76 65 6e 74 20 77 61 73 | 20 68 61 6e 64 6c 65 64 |vent was| handled|
|000015f0| 2c 20 74 72 75 65 20 69 | 73 20 72 65 74 75 72 6e |, true i|s return|
|00001600| 65 64 2e 20 20 49 66 20 | 74 68 65 20 65 76 65 6e |ed. If |the even|
|00001610| 74 20 69 73 20 66 61 6c | 73 65 2c 20 74 68 65 6e |t is fal|se, then|
|00001620| 20 74 68 65 20 65 76 65 | 6e 74 20 64 6f 65 73 6e | the eve|nt doesn|
|00001630| 27 74 0d 62 65 6c 6f 6e | 67 20 74 6f 20 61 20 4c |'t.belon|g to a L|
|00001640| 69 73 74 20 63 6f 6e 74 | 72 6f 6c 2c 20 61 6e 64 |ist cont|rol, and|
|00001650| 20 66 75 72 74 68 65 72 | 20 70 72 6f 63 65 73 73 | further| process|
|00001660| 69 6e 67 20 6f 66 20 74 | 68 65 20 65 76 65 6e 74 |ing of t|he event|
|00001670| 20 73 68 6f 75 6c 64 20 | 62 65 20 64 6f 6e 65 2e | should |be done.|
|00001680| 0d 0d 0d 00 b6 00 09 00 | 00 00 00 00 0b 00 09 00 |........|........|
|00001690| 04 00 00 00 09 00 00 00 | 00 00 00 00 00 0a 34 00 |........|......4.|
|000016a0| 0b 00 09 00 04 05 00 00 | 09 00 00 00 00 00 00 00 |........|........|
|000016b0| 00 0a 3e 00 0b 00 09 00 | 04 00 00 00 09 00 00 00 |..>.....|........|
|000016c0| 00 00 00 00 00 0f 66 00 | 0b 00 09 00 04 05 00 00 |......f.|........|
|000016d0| 09 00 00 00 00 00 00 00 | 00 0f 74 00 0b 00 09 00 |........|..t.....|
|000016e0| 04 00 00 00 09 00 00 00 | 00 00 00 00 00 11 98 00 |........|........|
|000016f0| 0b 00 09 00 04 05 00 00 | 09 00 00 00 00 00 00 00 |........|........|
|00001700| 00 11 a6 00 0b 00 09 00 | 04 00 00 00 09 00 00 00 |........|........|
|00001710| 00 00 00 00 00 12 48 00 | 0b 00 09 00 04 05 00 00 |......H.|........|
|00001720| 09 00 00 00 00 00 00 00 | 00 12 4f 00 0b 00 09 00 |........|..O.....|
|00001730| 04 00 00 00 09 00 00 00 | 00 00 00 |........|... |
+--------+-------------------------+-------------------------+--------+--------+